package edu.xmut.kakamusic.base;

import android.content.Context;
import android.view.KeyEvent;

import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;

import edu.xmut.kakamusic.MainActivity;

public class BaseFragment extends Fragment implements OnFragmentKeyDownListener {

    @Override
    public void onAttach(@NonNull Context context) {
        super.onAttach(context);
        MainActivity mainActivity = (MainActivity) requireActivity();
        mainActivity.setOnFragmentKeyDownListener(this);
    }

    @Override
    public boolean onKeyDown(int keyCode, KeyEvent keyEvent) {
        return false;
    }
}
